DataTables example 您所在的位置:网站首页 bootstrap pagelength DataTables example

DataTables example

2023-03-14 18:56| 来源: 网络整理| 查看: 265

As of DataTables 1.10.5 it is now possible to define initialisation options using HTML5 data-* attributes. The attribute names are read by DataTables and used, potentially in combination with, the standard Javascript initialisation options (with the data-* attributes taking priority).

Please note that the attribute values must contain valid JSON data or a Javascript primitive, as required by jQuery's $().data() method. This means that double quotes should be used inside the attribute if needed for a string (see the data-order in this example).

Additionally, jQuery will convert a dashed string into the camel-case notation used by DataTables for its options. For example data-page-length is used to represent pageLength.

The table below shows the use of pageLength and order on the main table. Column options can also be defined on the table column cells, as shown by the use of the columns.orderable option on the fifth column below.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有